#import "OcrPlugin.h"
#import "OcrViewFactory.h"

@implementation OcrPlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
//  FlutterMethodChannel* channel = [FlutterMethodChannel
//      methodChannelWithName:@"com.jacky.util/ocr_view"
//            binaryMessenger:[registrar messenger]];
//  OcrPlugin* instance = [[OcrPlugin alloc] init];
    NSString* name = @"com.jacky.util/ocr_view";
    OcrViewFactory* factory = [[OcrViewFactory alloc]initWithMessenger:[registrar messenger]];
    [registrar registerViewFactory:factory withId:name];
//  [registrar addMethodCallDelegate:instance channel:channel];
}

//- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
//  if ([@"getPlatformVersion" isEqualToString:call.method]) {
//    result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
//  } else {
//    result(FlutterMethodNotImplemented);
//  }
//}

@end
